#ifndef __MAIN_H
#define __MAIN_H

#include "gd32f4xx.h"
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>

#define CLAMP(value, min, max) (((value) < (min)) ? (min) : (((value) > (max)) ? (max) : (value)))

typedef uint8_t boolean_t;

#define RESET_FSM()       \
    do                    \
    {                     \
        s_tState = START; \
    } while (0);

#endif
